home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / CustomWriterGX / ChooserPACK.r < prev    next >
Encoding:
Text File  |  1996-03-20  |  3.4 KB  |  133 lines  |  [TEXT/MPS ]

  1. /*
  2.     FILENAME
  3.         ChooserPACK.r
  4.  
  5.     DESCRIPTION
  6.         Contains resources needed in order for this driver to work with
  7.         the Chooser.
  8.  
  9.     COPYRIGHT
  10.         Copyright © 1995 Apple Computer, Inc.
  11.         All rights reserved.
  12.     
  13.     Modification history
  14.         10/04/95 - David Hayward -    Version 1.0.4 modified code so that
  15.                                     the driver can be build under MPW,
  16.                                     Metrowerks, and Symantec.  In general,
  17.                                     all that was required to do this was 
  18.                                     to add an inline-assembly jumptable
  19.                                     and to store all globals off of the
  20.                                     message manager instance context.
  21.                                     Also made a few changes so that the
  22.                                     driver can be rebuilt to support any
  23.                                     resolution by changing the #defines
  24.                                     kResolution and kPatStretch in
  25.                                     "CommonDefines.h"
  26.  
  27.         06/14/95 - Dave Hersey -    Version 1.0.3 to fix a bug in
  28.                                     CustomBufferingAndIO.c when creating
  29.                                     high-res PICTs, and to make the size
  30.                                     of buffers more flexible.
  31.  
  32.         05/26/95 - Dave Hersey -    Version 1.0.2 to add the new 'outp'
  33.                                     desktop printer resource in NewApp.c.
  34.  
  35.         05/03/95 - Dave Hersey -    Version 1.0.1 to fix some minor bugs in
  36.                                     CustomBufferingAndIO.c.
  37.  
  38.         01/14/95 - Dave Hersey -    Created from the shell of a hollowed-out
  39.                                     ImageWriter driver.
  40. */
  41.  
  42.  
  43. #include "Types.r"
  44. #include "SysTypes.r"
  45. #include "GXPrintingResTypes.r"
  46. #include "GXPrintingResEquates.r"
  47.  
  48.  
  49. //--------------------------------------------------------------------------------------------
  50. // THINGS TO CONTROL THE DEFAULT CHOOSING MECHANISM
  51. //--------------------------------------------------------------------------------------------
  52.  
  53. // The type of communication this device uses (this is the default, the
  54. // actual value can be found in the desktop printer).
  55.  
  56. resource 'look' (-4096, sysheap, purgeable) {
  57.     1,
  58.     {
  59.         "Not Connected",
  60.         -4096,
  61.         iconCells,
  62.         "CustomWriter GX";
  63.     };
  64. };
  65.  
  66. resource 'comm' (-4096, sysheap, purgeable) {
  67.     NotConnected {}
  68. };
  69.  
  70.  
  71. //--------------------------------------------------------------------------------------------
  72. // STANDARD CHOOSER PACK STUFF
  73. //--------------------------------------------------------------------------------------------
  74.  
  75. // title string (we'll put a control here, so we don't want a title)
  76. resource 'STR ' (-4091, sysheap, purgeable)
  77. {
  78.     "";
  79. };
  80.  
  81. // "left" button title
  82. resource 'STR ' (-4093, sysheap, purgeable)
  83. {
  84.     "Create";
  85. };
  86.  
  87. // rectangle list
  88. resource 'nrct' (-4096, sysheap, purgeable) {
  89.     {
  90.     {112, 251, 132, 311};            // left button
  91.     {0,0,0,0};                        // right button
  92.     {-20000, 180, -20000+20, 400};    // on button (location of "connect via"
  93.                                     // popup is placed here, so I've moved
  94.                                     // it offscreen).
  95.  
  96.     {0,0,0,0};                        // off button
  97.     {0,0,0,0};                        // button label
  98.     };
  99. };
  100.  
  101. // Menu for the Chooser's connection type.
  102. resource 'MENU' (-4096, sysheap, purgeable)
  103. {
  104.     -4096,
  105.     textMenuProc,
  106.     0xFFFFFFFF,    
  107.     disabled,
  108.     "",
  109.     {}
  110. };
  111.  
  112. // Pop-up control for the Chooser's connection type
  113. resource 'CNTL' (-4096, sysheap, purgeable)
  114. {
  115.     {0, 0, 20, 213},                            // zero based control location
  116.     0,                                            // Title options 0 = Left justified
  117.     visible,                                    // Should we display the control?
  118.     95,                                            // Title Width
  119.     -4096,                                        // 'MENU' to display
  120.     popupMenuCDEFproc+popupFixedWidth,            // CDEF = CDEFID * 16 + varCode
  121.     0,                                             // refCon = ResType to append = None
  122.     "Connect via:"                                // Control title
  123. };
  124.  
  125. resource 'DITL' (-4096, sysheap, purgeable) 
  126. {
  127.     {
  128.         {3, 238, 23, 238 + 213}, 
  129.         Control {enabled, -4096},
  130.     };
  131. };
  132.  
  133.